<template>
  <div>
    <van-sticky :offset-top="700">
      <van-tabbar v-model="active">

        <van-tabbar-item name="home" icon="home-o" to="/firstPage">首页</van-tabbar-item>
        <van-tabbar-item name="type" icon="apps-o"  to="/type">分类</van-tabbar-item>
        <van-tabbar-item name="carts" icon="shopping-cart-o"  to="/carts">购物车</van-tabbar-item>
        <van-tabbar-item name="my" icon="setting-o"  to="/my">我的</van-tabbar-item>

      </van-tabbar>
    </van-sticky>
    <router-view/>
</div>
</template>

<script>
import {Sticky, Tabbar, TabbarItem} from 'vant';
import 'vant/lib/index.css';
export default {
  components: {
    [Tabbar.name]: Tabbar,
    [TabbarItem.name]: TabbarItem,
    [Sticky.name]: Sticky,
  },
  data() {
    return {
    }
  },
  computed:{
    active:{
      get(){
        return this.$route.meta.activeNum
      },
      set(){}

    }
  }
}
</script>

<style>

</style>